package de.slothsoft.commons.res;

import java.net.URL;
import java.util.TreeMap;

import javax.swing.ImageIcon;

@SuppressWarnings("nls")
public class CommonImages {

	private static java.util.Map<String, ImageIcon> images = new TreeMap<>();

	public static ImageIcon get(String imageName) {
		if (imageName == null) {
			return null;
		}

		ImageIcon icon = images.get(imageName);

		if (icon == null) {
			URL url = CommonImages.class.getResource("gfx/" + imageName);//$NON-NLS-1$
			if (url == null) {
				return null;
			}
			icon = new ImageIcon(url);
			images.put(imageName, icon);
		}

		return icon;
	}

	/*
	 * 
	 */

	public static final String SLOTHSOFT_ABOUT = "slothsoft_about.png";

	public static final String TOOLBAR_ABOUT = "toolbar_about.png";
	public static final String TOOLBAR_PLAY = "toolbar_play.png";
	public static final String TOOLBAR_OPEN = "toolbar_open.png";
	public static final String TOOLBAR_SAVE = "toolbar_save.png";
	public static final String TOOLBAR_OPTIONS = "toolbar_options.png";
	public static final String TOOLBAR_LIST = "toolbar_list.png";
	public static final String TOOLBAR_WELCOME = "toolbar_welcome.png";
	public static final String TOOLBAR_REFRESH = "toolbar_refresh.png";
	public static final String TOOLBAR_STOP = "toolbar_stop.png";
	public static final String TOOLBAR_ZOOM_IN = "toolbar_zoom_in.png";
	public static final String TOOLBAR_ZOOM_OUT = "toolbar_zoom_out.png";
	public static final String TOOLBAR_CLOSE = "toolbar_close.gif";
	public static final String TOOLBAR_LOG_OUT = "toolbar_logout.png";

	public static final String MENU_CLOSE = "menu_close.gif";
	public static final String MENU_CLOSE_ROLLOVER = "menu_close_rollover.gif";

	public static final String STATUS_ERROR = "status_error.gif";
	public static final String STATUS_ERROR_MEDIUM = "status_error_medium.png";

	public static final String OBJECT_CONSOLE = "object_console.png";

	public static final String QUICK_TIP = "quick_tip.png";

	public static final String DIALOG_ERROR = "dialog_error.png";

}
